<?php

namespace app\admin\controller;
use think\admin\Controller;
//渠道参数配置
class Channel extends Controller
{
    public function index()
    {
        $this->_applyFormToken();
        if ($this->request->isGet()) {
            $this->title = '修改渠道参数';
            $this->fetch();
        } else {
            $post = $this->request->post();
            // 数据数据到系统配置表
            foreach ($post as $k => $v) sysconf($k, $v);
            sysoplog('渠道参数配置', "修改成功");
            $this->success('修改成功！', admuri('admin/channel/index'));
        }
    }
}
